<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增业主成员')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-rel-add">

            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">名字：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">性别</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_user_sex')}">
                        <input type="radio" th:id="${dict.dictCode}" name="sex" th:value="${dict.dictValue}"  th:checked="${dict.default}">
                        <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电话：</label>
                <div class="col-sm-8">
                    <input name="phone" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">身份证号：</label>
                <div class="col-sm-8">
                    <input name="numberId" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">上传照片：</label>
                <div class="col-sm-8">
                    <input name="photo" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="font-noraml">多文件上传</label>
                <div class="file-loading">
                    <input id="fileinput-demo-1" type="file" multiple>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">业主状态</label>
                <div class="radio-box" th:each="dict : ${@dict.getType('owner_state')}">
                    <input type="radio" th:id="${dict.dictCode}" name="state" th:value="${dict.dictValue}" th:checked="${dict.default}">
                    <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">备注</label>
                <div class="col-sm-8">
                    <input name="remark"  class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "owner/rel"
        $("#form-rel-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-rel-add').serialize());
            }
        }
    </script>
</body>
</html>